CS450-FALL
2005
The
following directions apply to all assignments:
IMPORTANT:
FOLLOW THE FOLLOWING DIRECTIONS OR YOU RISK OF HAVING YOUR SUBMISSION NOT
GRADED!!!!!!!!
1.
Submit homework/project assignments to BLACKBOARD’s DIGITAL DROP BOX
only .
Include your source code files, WHEN APPLICABLE, compiled code, WHEN
APPLICABLE, executables, WHEN APPLICABLE, README file WHEN APPLICABLE, WORD
file with your text type answers etc as required (see 3 below).
2.
At the top of each source code file (if code is involved) include the
following comments: //Author: Your name //
Student
ID: your school ID// Assignment # : ___ // Problem#___//Date:
3.
All
assignments should include a WORD file named with the same name you use for the
zipped name (see
item 4). In the WORD file include : YOUR
NAME, YOUR STUDENT ID, YOUR
ASSIGNMENT
#, DATE SUBMITTED.
This WORD file also has the text answers to assignments or answers to project questions other than code (i.e. text exercises).
Include any
data if the assignment requires it. Any additional comments can be included in
the WORD file
(for example
special instructions as to how to execute your program IN CASE OF A PROJECT).
4.
Create a folder and include all the assignment files in that folder.
Name that folder the same name as the zipped file described next. Zip all files
and use the following convention to name the zipped file:
yourlastname_assignment#.zip (for projects use yourlastname_project#.zip).
Upload the zipped file to the digital drop box of Blackboard.
NOTE: ASSIGNMENTS ARE BASED ON BOTH THE TEXT AND ANY HANDOUTS PRESENT ON THE COURSE”S WEB SITE
1.
Name 6
technological advances in hardware and the year in which they were invented
(for one of the advances you can mention the decade only), in the early stages
of computing (late 40s and 50s), which helped in the advancement of computer
hardware designs.
2.
Name all the
microprocessors mentioned in the hardware history document (name at least 5),
the year they were introduced and the computer name or type that they were used
for originally.
3.
Outline 5
Mainframe computers, the name of the company that introduced them and the year
introduced (or the approximate period) some narrative about the design and
intended usage.
4.
The UNIVAC-1 was
introduced in 1954. Using figure 1 in one of the supplied articles identify the
expected Floating Point Operations (FLOPS) rate (give an approximate range) of
a computer designed in 2004.
1. Read the development of the Operating Systems Windows, and UNIX during the 1980’s. Discuss the reasons Windows was developed and why it caught on so fast. Who was the primary user of Windows in the 1980s? Why was UNIX still being advanced and who was the primary user of UNIX in the 1980s? List the major events that affected UNIX in the period 1980-1990 (other than simple releases) and the dates of those events.
2. By doing some research on the Internet identify the goals of GNU manifesto. Give a short history of its development and purpose. Identify its differences over “normal” UNIX. The inventor was Richard Stallman, a researcher who originally worked at MIT. Limit your answer to about half of a typed page.
1. Do exercise 1.5 from text
2. Do exercise 2.3 from text
1. Do exercise 2.6 from text
2. Do exercise 2.7 from text
1. Do exercise 2.10 from text
2. Do exercise 2.14 from text
Write a script for UNIX Bash shell that performs as a calculator. Name the script file calc.src.
Command structure: $./calc.src [optiuoins] arg1 arg2 filename.txt
Script functionality: Adds, subtracts, multiplies, divides, or gives the remainder of a division if asked in the options part of the command. The user provides two integers (they can be negative) on arguments 2 and 3. Argument 4 is the name of the file that the user designates for the results to be stored. The integers provided by the user and the result also appears on the screen.
Command structure options:
§ -a means add
§ -s means subtract
§ -m means multiply
§ -q means quotient
§ -r menas remainder
Your program first validates by making sure that the user entered the proper arguments. If not then a message is shown on the screen indicating the error.
Your program also checks to make sure that the file designated by the user has write and read rights and if not it sets the rights to read and write for all users and groups.
Example: # ./calc.rsc –a a 3 add.dat Output: # Error a is not numeric file was not created
Example: #./ calc.src –a 3 2 add.dat Output # 3+2 = 5 . In addition, a file add.dat is created on the current directory with its contents being: 3+2=5
Example: # calc –r 7 3 remainder.dat Output # 7 % 3 is 1. The same result is stored in the file remainder.dat
PROBLEM
7 (2.5 point)
Write a script program for Bash shell that manipulates strings provided in a file called test.txt using the grep family of commands. Name the script file greptests.src
Command structure: $./greptest.src.src [options] test.txt filename.txt
Options:
-ch select the lines from file test.txt that have at least 5 characters. Print results on the screen and in the file provided by user.
-un select the lines from file test.txt that have the string UNIX. Print results on the screen and in the file provided by the user.
Arg1: test.txt is the file that contains the following text (you need to create it):
A
ABC
AC
The operating system is UNIX
The system responds well if the program is written in UNIX commands
UNIX is UNIX
I am me
Arg2: filename.txt is the file name provided by the user.
As usually your program should validate the number of arguments provided by the user and the correct options symbol. The proper permissions should be issued for the files created.